package com.cskaoyan.service;

import com.cskaoyan.bean.data.CartCheckoutData;
import com.cskaoyan.bean.data.CartIndexData;
import com.cskaoyan.bean.vo.CartAddVo;
import com.cskaoyan.model.MarketCart;

import java.util.List;
import java.util.Map;

/**
 * @Description
 * @Author zoe ling
 * @Date 2024/6/12
 */
public interface CartService {

    long goodscount(int userId);





    CartIndexData index(Integer userId);
    List<MarketCart> userCartList(Integer userId);

    CartIndexData checked(Integer userId, Map<String, Object> map);

    MarketCart find(Integer userId, Integer goodsId, Integer productId);

    int create(CartAddVo cartAddVo, Integer userId);

    void modify(MarketCart updateCart);

    boolean updateChecked(Integer userId, List<Integer> productIds, Boolean isChecked);


    MarketCart getCartId(Integer userId, CartAddVo cartFastaddVo);

    CartCheckoutData checkout(Integer userId, Integer cartId,Integer addressId,Integer couponId,Integer userCouponId);

    MarketCart selectByGoodsId(Integer userId, CartAddVo cartFastaddVo);


    MarketCart findById(Integer cartId);

    boolean delById(Integer cartId);
}
